package org.hang.gift.controller;


import org.hang.gift.doc.GiftDoc;
import org.hang.gift.query.GiftQuery;
import org.hang.gift.service.IGiftDocService;
import org.hang.util.AjaxResult;
import org.hang.util.PageList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/giftDoc")
public class GiftDocController {

       @Autowired
       private IGiftDocService giftDocService;

       @PostMapping("/search")
       public AjaxResult SearchGifts(@RequestBody GiftQuery query){
              PageList<GiftDoc> pageList = giftDocService.searchGifts(query);
              return AjaxResult.me().setResultObj(pageList);
       }


}
